package com.gmp.product.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gmp.common.annotation.Excel;
import com.gmp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * 派单对象 work_dispatch
 *
 * @author Koi
 * @date 2025-10-10
 */
@TableName(resultMap = "com.gmp.product.mapper.WorkDispatchMapper.WorkDispatchResult")
public class WorkDispatch extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Excel(name = "工作名称")
    private String workName;

    /**
     * 派单编码
     */
    @Excel(name = "派单编码")
    private String workOrderCode;

    /**
     * 生产指令编号
     */
    @Excel(name = "生产指令编号")
    private String orderCode;

    /**
     * 派单人nickName
     */
    @Excel(name = "派单人nickName")
    private String dispatchPerson;

    /**
     * 接单人员
     */
    @Excel(name = "接单人员")
    private String receivePerson;

    /**
     * 接单用户ID
     */
    @Excel(name = "接单用户ID")
    private String userId;

    /**
     * 派单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "派单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dispatchTime;

    /**
     * 接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "接单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    /**
     * 派单状态
     */
    @Excel(name = "派单状态")
    //派单状态0-未派单 1-待接单 2-已接单 3-已完成 4-有异常
    private Long dispatchStatus;

    /**
     * 驳回原因
     */
    @Excel(name = "驳回原因")
    private String rejectReason;

    /**
     * 0-未删除，1-已删除
     */
    /** 逻辑删除标记：0-未删除，1-已删除 */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setWorkOrderCode(String workOrderCode) {
        this.workOrderCode = workOrderCode;
    }

    public String getWorkOrderCode() {
        return workOrderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setDispatchPerson(String dispatchPerson) {
        this.dispatchPerson = dispatchPerson;
    }

    public String getDispatchPerson() {
        return dispatchPerson;
    }

    public void setReceivePerson(String receivePerson) {
        this.receivePerson = receivePerson;
    }

    public String getReceivePerson() {
        return receivePerson;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }

    public void setDispatchTime(Date dispatchTime) {
        this.dispatchTime = dispatchTime;
    }

    public Date getDispatchTime() {
        return dispatchTime;
    }

    public void setReceiveTime(Date receiveTime) {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime() {
        return receiveTime;
    }

    public void setDispatchStatus(Long dispatchStatus) {
        this.dispatchStatus = dispatchStatus;
    }

    public Long getDispatchStatus() {
        return dispatchStatus;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public String getWorkName() {
        return workName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("workName", getWorkName())
                .append("workOrderCode", getWorkOrderCode())
                .append("orderCode", getOrderCode())
                .append("dispatchPerson", getDispatchPerson())
                .append("receivePerson", getReceivePerson())
                .append("userId", getUserId())
                .append("dispatchTime", getDispatchTime())
                .append("receiveTime", getReceiveTime())
                .append("dispatchStatus", getDispatchStatus())
                .append("rejectReason", getRejectReason())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isDelete", getIsDelete())
                .toString();
    }
}

